package com.ming.rabbitmq.eight;

import com.ming.rabbitmq.util.RabbitMqUtils;
import com.rabbitmq.client.BuiltinExchangeType;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.DeliverCallback;

import java.util.HashMap;

public class Consumer02 {

    public static final String DEAD_QUEUE="dead_queue2";

    public static void main(String[] args) throws Exception {

        Channel channel = RabbitMqUtils.getChannel();
        DeliverCallback deliverCallback = (consumerTag, message) -> {
            System.out.println("Consumer02接收到的消息："+new String(message.getBody()));
        };

        channel.basicConsume(DEAD_QUEUE, true, deliverCallback, consumeTag->{});

    }

}
